//
//  DengluViewController.m
//  TrueLove
//
//  Created by han on 15-1-30.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "DengluViewController.h"
#import "ZhuceViewController.h"
@interface DengluViewController ()

@end

@implementation DengluViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    UIImageView *backImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
    backImage.image = [UIImage imageNamed:@"02bOOOPIC2d.jpg"];
    [self.view addSubview:backImage];
    
    [self getMessage];
    [self getButton];
    
}
- (void)getMessage
{
    UITextField *phoneTextField = [[UITextField alloc] initWithFrame:CGRectMake(100, 100, 200, 30)];
    phoneTextField.placeholder = @"请输入手机号";
    phoneTextField.borderStyle = UITextBorderStyleRoundedRect;
    [self.view addSubview:phoneTextField];
    
    UITextField *passwordTextField = [[UITextField alloc] initWithFrame:CGRectMake(100, 150, 200, 30)];
    passwordTextField.placeholder = @"请输入密码";
    passwordTextField.borderStyle = UITextBorderStyleRoundedRect;
    [self.view addSubview:passwordTextField];
    
}
- (void)getButton
{
    UIButton *dengButton = [UIButton buttonWithType:UIButtonTypeSystem];
    [dengButton setTitle:@"登陆" forState:UIControlStateNormal];
    [dengButton addTarget:self action:@selector(dengButton:) forControlEvents:UIControlEventTouchUpInside];
    dengButton.frame = CGRectMake(100, 180, 100, 30);
    [self.view addSubview:dengButton];
    
    UIButton *zhuButton = [UIButton buttonWithType:UIButtonTypeSystem];
    [zhuButton setTitle:@"注册" forState:UIControlStateNormal];
    [zhuButton addTarget:self action:@selector(zhuButton:) forControlEvents:UIControlEventTouchUpInside];
    zhuButton.frame = CGRectMake(200, 180, 100, 30);
    [self.view addSubview:zhuButton];
    
}
- (void)dengButton:(UIButton *)deng
{
    
}
- (void)zhuButton:(UIButton *)zhu
{
    ZhuceViewController *zhuVC = [[ZhuceViewController alloc] init];
    [self.navigationController pushViewController:zhuVC animated:YES];
    [zhuVC release];
}
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    [self.view endEditing:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
